/*
PEDL_4A.do

Contains: Runs analyses for Figure 4 and Table A4

*/

* Set filepath (YOUR FILEPATH HERE)
global pedl ""

*******************************************************************************
*******************************************************************************
/* Coefs for Fig 4 and Table A4 */

import delimited "$pedl\primary_cleaned.csv", clear

gen intervention_weight = intervention_refills2*14.2
gen lpg_wt_used = bline_lpg + ((intervention_refills2 - 1)*14.2) + (14.2 - eline_lpg)
replace lpg_wt_used = 0 if lpg_wt_used < 0 | lpg_wt_used == .

* Regression -- weight purchased
reg intervention_weight i.arm bline_lpg

pwcompare arm, effects mcompare(tukey)	